home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mlib / include / mrect.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-26  |  1.2 KB  |  47 lines

  1.  
  2. #ifndef __MRECT_H
  3. #define __MRECT_H
  4.  
  5. class IntPoint {
  6. public:
  7.     int                      x;
  8.     int                      y;
  9. public:
  10.                              IntPoint (void);
  11.                  IntPoint (int anX, int aY);
  12.     inline IntPoint&         operator= (const IntPoint& APoint);
  13. };
  14.  
  15. class SimpleRect : virtual public MObject {
  16. public:
  17.     int                      left;
  18.     int                      top;
  19.     int                      right;
  20.     int                      bottom;
  21.  
  22. public:
  23.                  SimpleRect (void);
  24.                  SimpleRect (int x1, int y1, int x2, int y2);
  25.     inline void              Set (int x1, int y1, int x2, int y2);
  26.     inline SimpleRect&       operator= (const SimpleRect& ARect);
  27. };
  28.  
  29. class ViewPort : public SimpleRect {
  30. public:
  31.     int                      length;
  32.     int                      width;
  33.  
  34. public:
  35.                  ViewPort (void);
  36.                  ViewPort (int x1, int y1, int x2, int y2);
  37.                  ViewPort (const SimpleRect& ARect);
  38.     inline void             Set (int x1, int y1, int x2, int y2);
  39.     inline SimpleRect&       operator= (const SimpleRect& ARect);
  40. };
  41.  
  42. #define POINT         IntPoint
  43. #define RECT          SimpleRect
  44. #define VP            ViewPort
  45.  
  46. #endif
  47.